var AdminLists = function () {
	
	

    return {
        //main function to initiate the module

        init: function () {
        	$('#btnNewActivity').click(function(){
        		window.location.href = '/admin/newresource/get';
        	});
        	
        },
        modify: function( id ){
        	
        	window.location.href = '/admin/modifyresource/get?administrator_id=' + id;  		
  	
    	},
    	detail: function( id ){
        	
        	window.location.href = '/admin/detail/get?administrator_id=' + id;  		
  	
    	},
        del: function( id ){
        	bootbox.setDefaults({
        		locale: "zh_CN"
        	});
        	bootbox.confirm("是否确定删除该条记录?", function(result) {
        		if(result){
        			$.getJSON("/admin/delresource/delete?administrator_id="+id, function(data){
        				//location.reload(true);
        				window.location.href = "/admin/lists/get";
        			});
        		}
        	}); 
        }
    };

}();